package com.stp.picture.model.enums;

import cn.hutool.core.util.EnumUtil;
import cn.hutool.core.util.ObjUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 空间类型枚举类
 */
@AllArgsConstructor
@Getter
public enum SpaceTypeEnum {

    PRIVATE("私有空间", 0),
    TEAM("团队空间", 1);

    private final String text;

    private final int value;


    /**
     * 根据 value 获取枚举
     */
    public static SpaceTypeEnum getEnumByValue(Integer value) {
        return EnumUtil.getBy(SpaceTypeEnum::getValue,value);
    }
}
